#ifndef  __LM_COMMON_H__
#define __LM_COMMON_H__

#define PTH_DEBUG 1

#define MAKEFLAG(a,b,c,d)   (a<<24 | b<<16 | c<<8 | d)




#define CACHE_KEY_FRAME_SIZE 20
typedef enum
{
	STREAM_TP_VIDEO,
	STREAM_TP_AUDIO,
	STREAM_TP_FRONT,
	STREAM_TP_OTHER
}Stream_em;

typedef enum
{
	TP_VIDEO_I_FRAME,
	TP_VIDEO_P_FRAME,
	TP_VIDEO_B_FRAME,
	TP_VIDEO_AAC_FRAME,
	TP_VIDEO_PCM_FRAME,
	TP_VIDEO_G711A_FRAME,
	TP_VIDEO_G711U_FRAME,
	TP_VIDEO_FRONT_FRAME,
	TP_VIDEO_OTHER_FRAME
}Frame_em;

typedef struct 
{
	ushort  setSeq;
	ushort  getSeq;
	uint  frameSeq[CACHE_KEY_FRAME_SIZE];
}KeyFrame_st;


typedef struct 
{
	uint    flag;
	uint    buffSize;
	uint    totalNum;
	uint    videoNum;
	uint    audioNum;
	uint    startTime;
	uint    endTime;
	KeyFrame_st  KeyFrameSeq;
}BuffHead_st;


typedef struct 
{
	char   streamType;
	char   frameType;
	ushort def;
	uint   frameSize;
	uint   pts;
	char  *data;
}Frame_st;


typedef struct 
{	
	ushort writeSeq;
	ushort readSeq;
	Frame_st *frame;
}FrameInfList_st;


typedef struct
{
	ushort id;
	ushort readSeq;
}Reader_st;

typedef struct 
{	
	ushort writeSeq;
	Reader_st reader[15];
	Frame_st  *frame;
}FrameInfPthList_st;


#endif

